<?php
/* @var $this CompanyController */
/* @var $model Company */
/* @var $form CActiveForm */
?>

<?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'company-form',
    'enableAjaxValidation' => false,
    'htmlOptions' => array(
        'role' => 'form',
        'class' => 'form-horizontal',
        'enctype' => 'multipart/form-data'
    )
)); ?>

<?php if ($model->getErrors()) {
    ?>
    <div class="alert alert-error">
        <?php echo $form->errorSummary($model); ?>
    </div>
<?php } ?>
<div class="form admin-main-wrapper">
    <div class="block block-themed block-last">
        <div class="block-title">
            <h1>Đăng ký công ty</h1>
        </div>
        <div class="block-content">

            <div class="row control-group">
                <?php echo $form->labelEx($model, 'name', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model, 'name', array('size' => 60, 'maxlength' => 255)); ?>
                </div>
            </div>

            <div class="row control-group">
                <?php echo $form->labelEx($model, 'owner', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model, 'owner', array('size' => 60, 'maxlength' => 255)); ?>
                </div>
            </div>

            <div class="row control-group">
                <?php echo $form->labelEx($model, 'address', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model, 'address', array('size' => 60, 'maxlength' => 255)); ?>
                </div>
            </div>

            <div class="row control-group">
                <?php echo $form->labelEx($model, 'city', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model, 'city', array('size' => 60, 'maxlength' => 255)); ?>
                </div>
            </div>
            <div style="clear: both"></div>

            <div class="row control-group">
                <?php echo $form->labelEx($model, 'phone', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model, 'phone', array('size' => 20, 'maxlength' => 20)); ?>
                </div>
            </div>

            <div class="row control-group">
                <?php echo $form->labelEx($model, 'category_id', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->dropDownList($model, 'category_id', CHtml::listData($categories, 'id', 'name_vn')); ?>
                </div>
            </div>

            <div class="row control-group">
                <?php echo $form->labelEx($model, 'picture', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->fileField($model, 'picture'); ?>
                </div>
            </div>

            <div class="row control-group buttons">
                <div class="controls">
                    <?php echo CHtml::submitButton('Tạo', array('class' => 'btn btn-default')); ?>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->endWidget(); ?>

